Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix screen reader issues with CardAction/Button/MenuItem/NavigationViewItem #1235

Merged
merged 4 commits into from
Feb 1, 2025

Conversation

Difegue
Copy link
Contributor

@Difegue Difegue commented Sep 24, 2024

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

Screen Readers will try to narrate the Icon for Buttons and MenuItems if they have them set.
Additionally, CardAction and NavigationViewItem have no screen reader support whatsoever.

Issue Number: N/A

What is the new behavior?

  • Added a dedicated AutomationPeer to CardAction and NavigationViewItem
  • Overlaid Icons in Button/MenuItems with a transparent textblock to avoid them being read

Other information

@github-actions github-actions bot added controls Changes to the appearance or logic of custom controls. styles Topic is related to styles PR Pull request dotnet release navigation Changes to navigation related controls. labels Sep 24, 2024
@Difegue Difegue changed the title Fix screen reader issues with CardAction/Button/MenuItem Fix screen reader issues with CardAction/Button/MenuItem/NavigationViewItem Sep 24, 2024
@pomianowski pomianowski merged commit e55d7d7 into lepoco:main Feb 1, 2025
2 checks passed
pomianowski pushed a commit that referenced this pull request Feb 1, 2025
…ewItem (#1235)

* Add narration support to CardAction

* Fix screen readers trying to read IconElement in some cases

* Add narration support to NavigationViewItem

* Button workaround appears to be unnecessary now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
controls Changes to the appearance or logic of custom controls. dotnet navigation Changes to navigation related controls. PR Pull request release styles Topic is related to styles
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants